﻿using QMERP.Domain.Dtos;

namespace QMERP.Application.Services
{
    public interface IEnterStockOrderService
    {
        /// <summary>
        /// 入库单窗体
        /// </summary>
        /// <returns></returns>
        Task<PageResponse<EnterStockOrderResponse>> Query(PageRequest<EnterStockOrderRequest> request);
        /// <summary>
        /// 获取id的入库单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<EnterStockOrderResponse> Detail(long id);
        /// <summary>
        /// 获取对应业务单类型可入库的订单列表
        /// </summary>
        /// <param name="businessOrderType"></param>
        /// <returns></returns>
        Task<List<CanEnterStockOrderResponse>> GetCanEnterStockOrders(string businessOrderType);
        /// <summary>
        /// 入库单保存
        /// </summary>
        /// <param name="request"></param>
        /// <param name="isCheck"></param>
        /// <returns></returns>
        Task<EnterStockOrderResponse> Save(EnterStockOrderSaveRequest request, bool isCheck = false);
        /// <summary>
        /// 入库单审核
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task Check(long[] ids);
        /// <summary>
        /// 入库单弃审
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task UnCheck(long[] ids);
        /// <summary>
        /// 入库单取消
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="isOther"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        Task Cancel(long[] ids, bool isOther = false);
        /// <summary>
        /// 获取入库单主要信息列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<EnterStockOrderMainInfoResponse>> GetEnterStockOrderMainInfos(PageRequest<EnterStockOrderRequest> request);
        /// <summary>
        /// 导出缺少收货
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<LensViewResponse> ExportLackReceive(ExportLackReceiveRequest request);
        /// <summary>
        /// 扫描条码入库
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        Task ScanBarCodeEnterStock(ScanBarCodeEnterStockRequest request);
    }
}
